package com.ccp.dev.system.model;

import java.util.List;
import java.util.Objects;

public class FileManagementSquared {
    private String id;

    /**
     * 文件或文件夹名称
     */
    private String fileName;

    /**
     * 文件类型 1文件夹 2文件
     */
    private int fileType;
    /**
     * 文件格式如ppt、word等

     */
    private String fileFormat;
    /**
     * 父节点ID，如果是根节点，填0
     */
    private String parentId;
    /**
     * 父节点类型 1物理树目录节点 2逻辑归类树目录节点
     */
    private int parentType;
    /**
     * 上传人ID
     */
    private String uploadPersonId;


    private List<FileManagementSquared> childFiles;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public int getFileType() {
        return fileType;
    }

    public void setFileType(int fileType) {
        this.fileType = fileType;
    }

    public String getFileFormat() {
        return fileFormat;
    }

    public void setFileFormat(String fileFormat) {
        this.fileFormat = fileFormat;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public int getParentType() {
        return parentType;
    }

    public void setParentType(int parentType) {
        this.parentType = parentType;
    }

    public String getUploadPersonId() {
        return uploadPersonId;
    }

    public void setUploadPersonId(String uploadPersonId) {
        this.uploadPersonId = uploadPersonId;
    }

    public List<FileManagementSquared> getChildFiles() {
        return childFiles;
    }

    public void setChildFiles(List<FileManagementSquared> childFiles) {
        this.childFiles = childFiles;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        FileManagementSquared that = (FileManagementSquared) o;
        return fileType == that.fileType &&
                parentType == that.parentType &&
                Objects.equals(id, that.id) &&
                Objects.equals(fileName, that.fileName) &&
                Objects.equals(fileFormat, that.fileFormat) &&
                Objects.equals(parentId, that.parentId) &&
                Objects.equals(uploadPersonId, that.uploadPersonId) &&
                Objects.equals(childFiles, that.childFiles);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, fileName, fileType, fileFormat, parentId, parentType, uploadPersonId, childFiles);
    }

    @Override
    public String toString() {
        return "FileManagementGetFileType{" +
                "id=" + id +
                ", fileName='" + fileName + '\'' +
                ", fileType=" + fileType +
                ", fileFormat='" + fileFormat + '\'' +
                ", parentId=" + parentId +
                ", parentType=" + parentType +
                ", uploadPersonId=" + uploadPersonId +
                ", childFiles=" + childFiles +
                '}';
    }
}
